import request from '@/utils/request'

// 获取部门
export const getDepartment = () => request.get('/company/department')

// 获取部门负责人列表
export const getDepartmentManager = () => request.get('/sys/user/simple')

// 添加部门

export const addDepartment = data => request.post('/company/department', data)

// 删除部门  /company/department/{id} delDepartment

export const delDepartment = id => request.delete(`/company/department/${id}`)

// 获取部门详情  /company/department/{id} getDepartmentDetail
export const getDepartmentDetail = id => request.get(`/company/department/${id}`)

export const updateDepartment = (data) => request.put(`/company/department/${data.id}`, data)
